# -*- coding: utf-8 -*-
from selenium.webdriver.common.by import By

class Login:
    IN_USERNAME = (By.ID, 'username')
    IN_PASSWORD = (By.ID, 'password')
    BTN_SUBMIT = (By.ID, 'Login')


class Search:
    IN_QUERY = (By.ID, 'SupportSearch')
    BTN_SEARCH = (By.XPATH, r'//*[@id="content_wrapper"]/div[1]/div[1]/div[2]/div/a')
    FIRST_ELEMENT = (By.TAG_NAME, 'a')
    SEARCH_RESULTS = (By.CLASS_NAME, 'search-result')
    ARTICLE_TITLE = (By.CLASS_NAME, 'article-title')


class Downloads:
    BTN_READ_MORE = (By.LINK_TEXT, 'Read more')


class Signup:
    IN_FIRSTNAME = (By.ID, 'communitiesSelfRegPage:theForm:firstName')
    IN_LASTNAME = (By.ID, 'communitiesSelfRegPage:theForm:lastName')
    IN_NICKNAME = (By.ID, 'communitiesSelfRegPage:theForm:communityNickname')
    IN_EMAIL = (By.ID, 'communitiesSelfRegPage:theForm:email')
    IN_PASSWORD = (By.ID, 'communitiesSelfRegPage:theForm:password')
    IN_CONFIRM_PASSWORD = (By.ID, 'communitiesSelfRegPage:theForm:confirmPassword')
    BTN_SUBMIT = (By.ID, 'communitiesSelfRegPage:theForm:submit')


class Documentation:
    BTN_RELEASE_NOTE = (By.XPATH, '/html/body/div[3]/div[1]/div/div/div/div[1]/p/a')
    BTN_DOWNLOAD = (By.ID, 'download')


class Contact:
    IN_NAME = (By.ID, 'Text1')
    IN_EMAIL = (By.ID, 'ContactUs_Email')
    IN_PHONE = (By.ID, 'ContactUs_WorkPhone')
    IN_MESSAGE = (By.ID, 'ContactUs_Message')
    BTN_SUBMIT = (By.ID, 'Submit1')
